#ifndef IFILE_H
#define IFILE_H

#include "Framework/Types.h"
#include <fstream>

namespace tyro
{
	namespace IO
	{

		class IFile
		{
		public:

			IFile();
			void Open(const char* filePath, bool read);
			void OpenAppend(const char* filePath);
			UINT_32 ReadBytes(char*& buffer, UINT_32 numberOfBytes);
			UINT_32 WriteBytes(const char* const buffer, UINT_32 numberOfBytes);
			void Close();
			bool IsOpen();
			UINT_32 Length();

		private:
			std::fstream fileStream;
			char* fileName;
		};
	}
}

#endif